package com.bcu.cn.onlineexamsystem.studentmanage.service;

import com.bcu.cn.onlineexamsystem.studentmanage.entity.Question;
import com.bcu.cn.onlineexamsystem.studentmanage.entity.StudentAnswer;
import com.bcu.cn.onlineexamsystem.studentmanage.entity.StudentExam;

import java.util.List;
import java.util.Map;

public interface StudentExamService {
    
    // 开始考试
    StudentExam startExam(String studentId, Long examId);
    
    // 获取考试题目
    List<Question> getExamQuestions(Long examId);
    
    // 保存答案
    void saveAnswer(StudentAnswer answer);
    
    // 提交考试
    void submitExam(Long recordId, List<StudentAnswer> answers);
    
    // 获取考试状态
    StudentExam getExamStatus(String studentId, Long examId);
    
    // 获取考试时长（分钟）
    Integer getExamDuration(Long examId);
    
    // 获取已保存答案
    List<StudentAnswer> getSavedAnswers(Long recordId);
    
    // 获取考试详情
    Map<String, Object> getExamDetailForStudent(Long examId);
    
    Long getStudentExamRecordId(String studentId, Long examId);
    
    Map<String, Object> getExamDetailForStudentWithAnswer(Long examId, Long recordId);
}